home *** CD-ROM | disk | FTP | other *** search
- property TotSingleNouns, TotPlurNouns, TotAdjectives, TotVerbs, TotArticles, TotAdverbs, TotSettings, TotTalkToWho, TotSpecific, TotMusiPaus, MarkSingleNouns, MarkPlurNouns, MarkAdjectives, MarkVerbs, MarkArticles, MarkAdverbs, MarkSettings, MarkTalkToWho, MarkSpecific, MarkMusiPaus, MarkMiniPaus, MaxLines, TotalPoemMarks, CurPoemMark, TotMessage, MarkMessage, SliderBallChan, PoemTextLST, WordTextChan, BigPoemLST, LineMakersLST, PoemDateTime
-
- on birth me
- set WordTextChan to 15
- set TotMessage to 3
- set MarkMessage to "Message"
- set BigPoemLST to []
- set SliderBallChan to 9
- set LineMakersLST to []
- add(LineMakersLST, "MakeLineV1")
- add(LineMakersLST, "MakeLineV2")
- add(LineMakersLST, "MakeLineV3")
- add(LineMakersLST, "MakeLineV4")
- add(LineMakersLST, "MakeLineV5")
- add(LineMakersLST, "MakeLineV6")
- add(LineMakersLST, "MakeLineV5")
- add(LineMakersLST, "MakeLineV6")
- set TotSingleNouns to 19
- set TotPlurNouns to 20
- set TotAdjectives to 25
- set TotVerbs to 16
- set TotArticles to 4
- set TotSettings to 6
- set TotTalkToWho to 9
- set TotSpecific to 8
- set TotMusiPaus to 5
- set MarkSingleNouns to "sn"
- set MarkPlurNouns to "pnoun"
- set MarkAdjectives to "adj"
- set MarkVerbs to "b"
- set MarkArticles to "art"
- set MarkSettings to "Setting"
- set MarkTalkToWho to "pad"
- set MarkSpecific to "Specific"
- set MarkMusiPaus to "MusiPaus"
- set MarkMiniPaus to "MiniPaus"
- return me
- end
-
- on cleanupBeatnik me
- puppetSprite(SliderBallChan, 0)
- puppetSound(0)
- end
-
- on PrepSlider me
- puppetSprite(SliderBallChan, 1)
- set the constraint of sprite SliderBallChan to SliderBallChan - 1
- set MaxLines to 4
- end
-
- on DumpPoemToPage me
- set rand to count(PoemTextLST)
- set pos to random(rand)
- set tword1 to getAt(PoemTextLST, pos)
- if (tword1 = RETURN) or (tword1 contains ",") then
- set tword1 to getAt(PoemTextLST, pos - 1)
- end if
- set rand to count(PoemTextLST)
- set pos to random(rand)
- set TWord2 to getAt(PoemTextLST, pos)
- if (TWord2 = RETURN) or (TWord2 contains ",") then
- set TWord2 to getAt(PoemTextLST, pos - 1)
- end if
- put tword1 && TWord2 into field "PoemTitleFLD"
- put PoemDateTime & RETURN & RETURN into field "PoemPageFLD"
- repeat with x = 1 to count(PoemTextLST)
- set tx to getAt(PoemTextLST, x)
- if (tx = ",") or (tx = RETURN) then
- put tx after field "PoemPageFLD"
- next repeat
- end if
- put " " & tx after field "PoemPageFLD"
- end repeat
- end
-
- on TempStorePoem me
- put RETURN & RETURN & field "PoemTitleFLD" & RETURN & field "PoemPageFLD" & RETURN after field "Saved Poems"
- go("SavedPoems")
- end
-
- on DragSliderBall me
- puppetSound("PopBeep.001")
- repeat while the mouseDown
- set the locH of sprite SliderBallChan to the mouseH
- if soundBusy(1) then
- nothing()
- else
- puppetSound("Slitter.1")
- end if
- updateStage()
- end repeat
- puppetSound("Beepy02.AIF")
- repeat while soundBusy(1)
- nothing()
- end repeat
- set L to the left of sprite (SliderBallChan - 1)
- set r to the right of sprite (SliderBallChan - 1)
- set range1 to r - L
- set SectionWidth to range1 / 10
- set tempLST to []
- repeat with x = 1 to 10
- add(tempLST, SectionWidth * x)
- end repeat
- set h to the locH of sprite SliderBallChan
- set NormH to h - L
- add(tempLST, NormH)
- sort(tempLST)
- set MaxLines to getPos(tempLST, NormH)
- end
-
- on MakePoem me
- global BeatnikMan
- set the randomSeed to random(1408227850) + random(1408227850)
- set BigPoemLST to []
- set PoemTextLST to []
- set rand to count(LineMakersLST)
- repeat with x = 1 to MaxLines
- set pos to random(rand)
- set LineMakerDo to getAt(LineMakersLST, pos)
- set DoThis to LineMakerDo && "BeatnikMan"
- do(DoThis)
- end repeat
- set TotalPoemMarks to count(BigPoemLST)
- set CurPoemMark to 1
- set PoemDateTime to the time & ", " & the long date
- cleanupBeatnik(me)
- kickoff(me)
- end
-
- on kickoff me
- set Mark to getAt(BigPoemLST, CurPoemMark)
- set CurPoemMark to CurPoemMark + 1
- go(Mark)
- end
-
- on RaveOn me
- set txtcst to the castNum of sprite WordTextChan
- if txtcst = 0 then
- add(PoemTextLST, RETURN)
- else
- if the castType of cast txtcst = #text then
- add(PoemTextLST, the text of cast txtcst)
- end if
- end if
- set Mark to getAt(BigPoemLST, CurPoemMark)
- set CurPoemMark to CurPoemMark + 1
- if CurPoemMark > TotalPoemMarks then
- go("BeatnikFinale")
- else
- go(Mark)
- end if
- end
-
- on MakeLineV1 me
- set n to random(TotPlurNouns)
- set pnoun1 to MarkPlurNouns & n
- add(BigPoemLST, pnoun1)
- set n to random(TotVerbs)
- set verb1 to MarkVerbs & n
- add(BigPoemLST, verb1)
- set n to random(TotPlurNouns)
- set pnoun2 to MarkPlurNouns & n
- add(BigPoemLST, pnoun2)
- add(BigPoemLST, MarkMiniPaus)
- add(BigPoemLST, pnoun2)
- add(BigPoemLST, verb1)
- set n to random(TotPlurNouns)
- set pnoun3 to MarkPlurNouns & n
- add(BigPoemLST, pnoun3)
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-
- on MakeLineV2 me
- set n to random(TotAdjectives)
- set adj1 to MarkAdjectives & n
- add(BigPoemLST, adj1)
- set n to random(TotPlurNouns)
- set pnoun2 to MarkPlurNouns & n
- add(BigPoemLST, pnoun2)
- set n to random(TotVerbs)
- set verb1 to MarkVerbs & n
- add(BigPoemLST, verb1)
- set n to random(TotSingleNouns)
- set pnoun2 to MarkSingleNouns & n
- add(BigPoemLST, pnoun2)
- set n to random(TotPlurNouns)
- set pnoun2 to MarkPlurNouns & n
- add(BigPoemLST, pnoun2)
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-
- on MakeLineV3 me
- set n to random(TotSingleNouns)
- set n1 to MarkSingleNouns & n
- add(BigPoemLST, n1)
- set n to random(TotSingleNouns)
- set n2 to MarkSingleNouns & n
- add(BigPoemLST, n2)
- set n to random(TotSingleNouns)
- set n3 to MarkSingleNouns & n
- add(BigPoemLST, n3)
- add(BigPoemLST, MarkMiniPaus)
- set n to random(TotSingleNouns)
- set n4 to MarkSingleNouns & n
- add(BigPoemLST, n4)
- add(BigPoemLST, n3)
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-
- on MakeLineV4 me
- set n to random(TotAdjectives)
- set adj1 to MarkAdjectives & n
- add(BigPoemLST, adj1)
- set n to random(TotAdjectives)
- set adj2 to MarkAdjectives & n
- add(BigPoemLST, adj2)
- set n to random(TotSingleNouns)
- set n1 to MarkSingleNouns & n
- add(BigPoemLST, n1)
- set n to random(TotSingleNouns)
- set n2 to MarkSingleNouns & n
- add(BigPoemLST, n2)
- if random(100) < 35 then
- set n to random(TotSettings)
- set s1 to MarkSettings & n
- add(BigPoemLST, s1)
- end if
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-
- on MakeLineV5 me
- set n to random(TotArticles)
- set art1 to MarkArticles & n
- add(BigPoemLST, art1)
- set n to random(TotSingleNouns)
- set n1 to MarkSingleNouns & n
- add(BigPoemLST, n1)
- set n to random(TotPlurNouns)
- set pnoun1 to MarkPlurNouns & n
- add(BigPoemLST, pnoun1)
- set n to random(TotVerbs)
- set verb1 to MarkVerbs & n
- add(BigPoemLST, verb1)
- set n to random(TotArticles)
- set art1 to MarkArticles & n
- add(BigPoemLST, art1)
- set n to random(TotAdjectives)
- set adj1 to MarkAdjectives & n
- add(BigPoemLST, adj1)
- set n to random(TotPlurNouns)
- set pnoun1 to MarkPlurNouns & n
- add(BigPoemLST, pnoun1)
- if random(100) < 25 then
- set n to random(TotTalkToWho)
- set t1 to MarkTalkToWho & n
- add(BigPoemLST, t1)
- end if
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-
- on MakeLineV6 me
- set n to random(TotAdjectives)
- set adj1 to MarkAdjectives & n
- add(BigPoemLST, adj1)
- set n to random(TotPlurNouns)
- set pnoun1 to MarkPlurNouns & n
- add(BigPoemLST, pnoun1)
- add(BigPoemLST, MarkMiniPaus)
- set n to random(TotMessage)
- set m1 to MarkMessage & n
- add(BigPoemLST, m1)
- set n to random(TotMusiPaus)
- set MusiPaus1 to MarkMusiPaus & n
- add(BigPoemLST, MusiPaus1)
- end
-